<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .innerDiv {
            width: 100px;
            height: 100px;
            border: 1px solid rebeccapurple;
            /* display:inline;  block块 inline行   不合适，丢失宽和高*/
        }

        .d1 {
            background-color: aquamarine;
            position: absolute;
            top: 100px;
            right: 100px;
        }

        .d2 {
            background-color: chartreuse;
            position: relative;
            top: 100px;
            left: 30px;
        }

        .d3 {
            background-color: cyan;
            position: fixed;
            top: 100px;
            left: 300px;
        }
        /*
        position
            static      默认
            absolute    绝对
            relative    相对 相对于元素原本的位置
            fixed       相对 相对于浏览器窗口
        left
        right
        top
        bottom   
        */
    </style>
</head>

<body>

    <div class="innerDiv d1">diva</div> 
    <div class="innerDiv d2">divb</div>
    <div class="innerDiv d3">divc</div>

</body>

</html>